package com.education.upload.pojo;

import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;

/**
 * zcp
 */
public class MultipartFileParam implements Serializable {

    private String uploadId;//文件传输任务ID
    private String filename;//原文件名称带后缀
    private int chunkNumber;//当前为第几分片
    private long chunkSize;//每个分块的大小
    private int totalChunks;//分片总数
    private String key;//系统生成的唯一文件名，之后下载会用到(带文件后缀名)
    private MultipartFile file;//分块文件传输对象

    public String getUploadId() {
        return uploadId;
    }

    public void setUploadId(String uploadId) {
        this.uploadId = uploadId;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public int getChunkNumber() {
        return chunkNumber;
    }

    public void setChunkNumber(int chunkNumber) {
        this.chunkNumber = chunkNumber;
    }

    public long getChunkSize() {
        return chunkSize;
    }

    public void setChunkSize(long chunkSize) {
        this.chunkSize = chunkSize;
    }

    public long getTotalChunks() {
        return totalChunks;
    }

    public void setTotalChunks(int totalChunks) {
        this.totalChunks = totalChunks;
    }

    public String getIdentifier() {
        return key;
    }

    public void setIdentifier(String identifier) {
        this.key = identifier;
    }

    public MultipartFile getFile() {
        return file;
    }

    public void setFile(MultipartFile file) {
        this.file = file;
    }

    @Override
    public String toString() {
        return "MultipartFileParam{" +
                "uploadId='" + uploadId + '\'' +
                ", filename='" + filename + '\'' +
                ", chunkNumber=" + chunkNumber +
                ", chunkSize=" + chunkSize +
                ", totalChunks=" + totalChunks +
                ", key='" + key + '\'' +
                ", file=" + file +
                '}';
    }
}
